package com.woniu.controller.config.init;

import com.woniu.service.medicalService.IDepartmentService;
import com.woniu.service.medicalService.IDictionaryMSService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

//数据预热
@Component
public class InitIndexRunner implements CommandLineRunner {

    @Autowired
    private IDepartmentService departmentService;

    @Autowired
    private IDictionaryMSService dictionaryService;

    @Override
    public void run(String... args) {

        //初始化科室信息
        departmentService.initDepartment();

        //初始化数据字典
        dictionaryService.initDictionary();

    }

}
